1. Field of the Invention
The present invention relates to a method of and an apparatus for processing a digital image which is obtained from a scanner, a digital camera or other apparatuses.
2. Description of the Background Art
A printed matter is customarily created by printing haldtone dots. A printed matter which is printed in halftone dots has a resolution of about 65 to 200 dpi.
FIG. 13 shows a case that an image inputting portion such as a scanner reads a printed matter which is recorded in halftone dots. FIG. 13 is a view of a positional relationship between halftone dots and pixels which are to be read, and the illustrated halftone dot image which is an original image has a density of 50%. In other words, the shadowed regions in FIG. 13 are a portion where haldtone dots are recorded. Now, a description will be given on a case where such an original image is read as pixels P1 to P8 whose size is indicated as the dotted frames.
The size of one pixel shown in FIG. 13 is about 87.5% of the size of one halftone dot. In such a case, densities which are measured in the pixels P4 and P5 are 50% and the same as the density of the original image, and therefore, a consistency is ensured. However, densities which are measured in the pixels P1 and P8 are higher than 50% since much blackened region where the halftone is blackened is contained in a pixel region of each one of the pixels P1 and P8. In reality, the densities in the pixels P1 and P8 are about 62%. Meanwhile, densities which are measured in the pixels P2, P3, P6 and P7 are also higher than 50%. Thus, the densities which are measured in the pixels P1, . . . , P8 periodically change between 50% and 62%. Considering that the density of the original image is 50%, this is a deterioration in the quality of the image.
A cause is interference which is created due to differences between the halftone dot size of the original image and the pixel size of the pixels which are to be read. Hence, as the pixel size becomes smaller than the halftone dot size, the densities of the halftone dots are read rather than the density of the original image are read, which leads to greater changes in the density between the pixels. Further, when the pixel size is close to the halftone dot or in a similar situation, a cycle of the density change becomes longer, which appears as moire patterns which are visually noticeable.
Moire patterns are noticeable where a density level is flat. In reality, although moires are not very noticeable in a middle density region where a density is 50%, moires appear remarkably noticeable in a high density region where a density is higher or a low density region where a density is lower and degrades the quality of an image.
The phenomenon described above occurs also when a similar condition to the above is satisfied regarding a relationship between a pixel size and a pattern of a general original image which is expressed by other method except for halftone dots, a pattern of an object, or the like. In short, in some cases, moires are created from an image which is obtained by reading a transparent original or a reflective original with a scanner and an image which is obtained with a digital camera.
To eliminate moires and prevent a deterioration in the quality of an image, image processing using an image filter is customarily performed.
FIG. 14 is a schematic structure diagram of a conventional image processing apparatus. A main signal S regarding a pixel which is to be processed (hereinafter "objective pixel") is subjected to filter computation which is performed by an image filter which has a predetermined size which is set in advance by a filter computation portion 400, whereby a filtered signal S' is generated. FIG. 15 shows one example of the image filter which is used for this purpose. In such a conventional image processing apparatus, both a horizontal size and a vertical size of the image filter are set to be about twice the size of each halftone dot. Hence, in the case of the image filter which is shown in FIG. 15, for example, the size of one pixel is about 2/5 of the size of halftone dots or larger. In the conventional image processing apparatus, the filter computation portion 400 aligns the center of the image filter to an objective pixel, calculates a weighted mean of the respective density values in accordance with weighting factors which are assigned to the objective pixel and surrounding pixels, and outputs the weighted mean as the filtered signal S'.
As described above, the conventional image processing apparatus executes the processing using the image filter as that shown in FIG. 15 to thereby calculate a weighted mean of the densities in a region which is larger (i.e., about twice larger) than the halftone dot size and perform smoothing, and therefore, the conventional image processing apparatus removes a frequency component which is contained in a halftone dot pattern and eliminate an influence due to the halftone dot size. Hence, a filtered image does not contain moires nor have a degraded image quality.
By the way, in general, an edge portion of an image of a printed matter which is recorded in halftone dots is reproduced with a higher resolution than a halftone dot size. FIGS. 16A, 16B and 16C are explanatory diagrams showing a conventional method of generating one halftone dot. As shown in FIG. 16A, a region which indicates the size of one halftone dot is divided into four blocks B1, . . . , B4, and each block is further divided into blackened regions. A threshold value is set for each blackened region, as shown in FIG. 16A. On the other hand, when a density value which is obtained by reading an original image is "20" at positions which correspond to the blocks B1 and B4 but "10" at positions which correspond to the blocks B2 and B3 as shown in FIG. 16B, the density value is compared with the threshold values which are shown in FIG. 16A and the regions are blackened one by one from the center of the halftone dot. In this manner, the halftone dot as that shown in FIG. 16C is recorded.
FIG. 17 shows a case where an edge portion of an image is recorded by such a recording method. FIG. 17 illustrates an edge portion of a halftone dot image, and the dotted line in FIG. 17 indicates an edge of the image. The right-hand side of the dotted line is where a density is 50%, while the left-hand side of the dotted line is where a density is 0%. As shown in FIG. 17, since halftone dots are recorded in accordance with density values which correspond to the respective four divided blocks in the edge portion of the halftone dot image, the image is reproduced with a high resolution. A middle density region of an original image contains relatively many such edge portions of the halftone dot image which are reproduced with a high resolution.
However, as the conventional image processing apparatus executes smoothing using the image filter as that shown in FIG. 15 in an effort to prevent moires and a degraded image quality, an edge portion of a halftone dot image which is reproduced with a high resolution in the manner described above is also smoothed out and smeared.